
import request from '@/utils/request.js'

//文章分类相关API

//1.添加文章分类项
export const cateGory = (data) => {
	//这里添加是需要该用户id的，不过后端已经实现，不需要传入本用户id
	return request.post('/category', data)

}

//2.展示文章分类列表
export const cateGoryListService = () => {
	return request.get('/category')
}

//3.根据id删除文章
export const deleteCateGory = (id) => {
	return request.delete('/category/' + id)
}

//4.文章详情
export const cateGoryDetails = (id) => {
	return request.get('/category/detail?id=' + id)
}

//5.文章数据修改,先要完成4
export const update = (data) => {
	return request.put('/category', data)
}